Designing an R.F.O.

It's time to build the real thing! During this "training" session, you will be prompted to perform some operations which are very useful to design the R.F.O. but somewhat boring... Sorry guys! It won't be that bad.

You have been appointed Chief Engineer of the R.F.O. project.
What is an R.F.O. ?
An R.F.O. is a Rubbish Flying Object.
Let's go!

Before we go into the design, it would be better to reset AD2K2. While you are in the Graphic Editor, click on the first button of the tool bar. This one with a white sheet on it. An input window is displayed on the right of the screen. Enter "RFOAssy" in the assembly name data field. Make sure the master project checkbox is checked and enter "MyRFO" in the project name data field. Give a short description to both (for instance "RFO main assembly" to the assembly and "RFO black program" to the project). A dialog box will ask you if you want to clear the existing data (unless you have just started a new session). Accept it. Check then that you are in the front view and enter -3.500 as the current plane "y" coordinate in the input data field at the bottom of the Graphic Editor window. Don't forget to validate your input by pressing the enter key.

Building a dice

We will start the design with a cubic form. It will take you a few clicks. Cubic forms are not common in the design of aircraft. Take it as a training session : you will have to use a couple of menu options. It may help you to understand the behavior of AD2K2.

Create a new sub-assy and call it "DICE". We will store the cubic form in this DICE sub-assy. Create a square (Draw/Shape.../square menu option). Enter 7.000 as the length of the square side in the temporary input window which is displayed on the right of the screen. You can see that the front radio-button is the default setting for the plane of the shape and that the center of the shape is located in:
      0.000  -3.500  0.000
Validate by clicking on the Draw button. A square is drawn on the screen.

We will use this square as the basis of our DICE. Select the Draw/Build a cylinder menu option. The default setting for the axis of the cylinder is the vector one: it sounds good to me. The coordinates of the vector are not fitted to our purpose, replace them with the following:
      0.000  7.000  0.000
The destination sub-assy is correct (DICE): validate the input by clicking on the build button. Select the 3D view option at the bottom of the screen and press several times on the Q key to look at the result in a 3D view.


It looks like a dice but there is something special with it. The front side and the aft side are made up of a simple square while the other sides are made up of two triangles. Well... remember how we built this dice. We began our job by drawing a square and we got it. Nothing wrong with it... except that the Flight Simulator viewer only deals with triangles. So we need to convert both squares into triangles. Let's go back to the drawing board.

Make sure the DICE sub-assy is selected (the icon figuring a small light on the DICE sub-panel should be green). If it is not, click on this small light.


Click now on the sub-assy code window button of the sub-assy panel. The sub-assy code window is displayed.


You can see that the first chain in the sub-assy is a square (it has 4 vertices) and that it is a hidden chain.
  HIDDEN  4; 9, 8, 7, 6
Don't worry with the numbers following the semi column : the vertex numbering is an internal process of AD2K2 that you do not have to bother with.

This is quite normal : as Flight Simulator does not deal with quares, AD2K2 automatically gives them the hidden attribute. Exit the sub-assy code page by clicking on the Quit button. Converting a polygon into triangles is simple : there is a menu option in the Draw menu to do it. We just need to select the square and to apply this menu option to it.

Press the C key as many times as needed to get one of the squares drawn with a cyan/yellow dotted line. The cyan/yellow colors mean that the chain is hidden and that it is selected. Select the Draw/Make triangles menu option. Two triangles are automatically built out of the selected square. Let's try to find the other square. Press again several times the C key. There is no way to capture the last square !

It's worth a bit of explanation. The build a cylinder menu option automatically builds a cylinder out of a basic shape. Sometimes you need to have it covered with a polygon, sometimes you do not. AD2K2 does build the cover polygon but it stores it in the desk sub-assy. It is up to you to use it or not. Select the desk sub-assy by clicking on the small icon figuring a red light in the DICE sub-panel of the sub-assy panel (it will turn it into a green light). Click then on the show selection button on the Graphic Editor tool bar. The graphic display is cleared of everything which does not belong to the desk. There should remain a single square on the graphic display since we did not store any other chain into the desk. Select it by clicking on one of its vertices. Convert it into triangles by selecting the Draw/Make triangles menu option.

The triangles we have just created are in the desk sub-assy. We need to move them into the DICE sub-assy. We will use the multiple selection buffer to do that. Activate the multiple selection mode by clicking on the open selection button on the Graphic Editor tool bar. One of the two triangles should be selected. If it is not, press the C key as many times as needed to do it. Press then the space key. It stores the selected chain into the multiple selection buffer. The selected triangle is now drawn with a light green color. Press again the C key to select the other triangle (press it twice if needed). Store it in the multiple selection buffer by pressing the space key. The second triangle is drawn with a light green color while the previous one becomes yellow.

Both triangles are now stored into the multiple selection buffer : we just have to move them into the DICE sub-assy. Activate the Selection/Move to sub-assy menu option and select the DICE sub-assy in the combo-box which is displayed on the right of the Graphic Editor window. Validate by clicking on the OK button. This is it. Exit the multiple selection mode by deselecting the open selection button on the tool bar.

Congratulation, Mr. Chief Engineer, you have built your first 3D volume! Select the 3D view option at the bottom of the Graphic Editor window and press several times on the Q key to see it in a 3D view. Isn't that great?

This wire thing looks too "abstract" ? Click on the 3D surface viewer button of the sub-assy panel. A 3D display window is opened which gives you a picture of what the dice looks like. On the right of the window, a sub-assy selection panel allows you to select the sub-assies you want to see by checking/unchecking them in the list (at the moment, there is just one available sub-assy). You can orient the dice by using the pad below the sub-assy panel. You can also adjust its apparent distance from the viewer by using the Up/Down control above the pad.

I am sure you want to see it on the tarmac. Be patient, it shouldn't take a long time. I promise. Go back to the side view and then open the Model Tree Editor ( button). The assembly tree is limited to the only root node.

At the right of the tree display panel, the sub-assy panel shows the only available sub-assy which is the DICE. It is unchecked since it is not yet assigned to the tree. Select the root node. Click on the add button. An undefined sub-assy node is added to the root node (the icon background color is pink). Select it and click on the properties button. The sub-assy selection window is displayed. Select the only available sub-assy which is the DICE and validate. It is now assigned to the sub-assy node (the icon background color is yellow). In the sub-assy panel, you can see that the Dice item is now checked. Click on the master project button. The master project code page is displayed. It is pretty short:
MYRFO   PROJECT          RFO black program
        MODEL SIZE       50 ft
        INTERNAL VIEW    no view
RFOASSY INSERT MAIN ASSY RFOASSY
        END OF PROJECT   caution : this is not a return instruction

Tip: You can modify the description of the project or of the main assembly by double-clicking on the data field of the related instruction.

Tip: The INTERNAL VIEW instruction allows you to assign an internal view to your model. The INTERNAL VIEW instruction acts as an assembly call. The internal view must be designed and saved as an assembly.


It looks like a small piece of programme, doesn't it? The entry point is the PROJECT instruction. The following instruction is a MODEL SIZE instruction. The default value is 50 ft. You can adjust it by double-clicking on the data field of this instruction. Then there is an INTERNAL VIEW instruction. We will see how to use this instruction later. At the moment, there is no internal view and this instruction has no effect. The following instruction is an INSERT MAIN ASSY instruction. This instruction simply merges the assembly code page into the project code list. The last instruction is an END OF PROJECT. It has no effect. There is no RETURN in this project code page. In this particular case, we do not need one. The INSERT MAIN ASSY merges the assembly resulting code into the project code page:
MYRFO   PROJECT          RFO black program
        MODEL SIZE       50 ft
        INTERNAL VIEW    no view
RFOASSY ASSEMBLY         RFO main assembly
DICE    CALL SUBASSY     dice sub-assy
        RETURN

        END OF PROJECT   caution : this is not a return instruction

As the assembly resulting code is ended by a RETURN, it ends the project code as well. Please have a look at the Model Tree Editor reference guide to get more information. Exit the Project Editor.

Let us assign a color to this dice. Select the DICE sub-assy. Select the color option in the combo-box of the DICE sub-panel (it is presently assigned an undefined option. Click on the sub-assy code window button of the sub-assy panel. The sub-assy code window is displayed. Double-click on the small square at the bottom of the window and select a color. The other options of the color sub-panel will be used as they are (no glare, 100%).


And now, ladies and gentlemen... the compilation of the model. Go back to the Project Editor and click on the compile button on the tool bar. An input window is displayed asking you for the compilation options. Accept the default settings and validate by clicking on the OK button. Another window is displayed. Click on the write button. This is it! The compilation was successful.

Whaou... you did it! Before we test it, I propose you to save the file. Select the File/Save as menu option and enter "MyRFO" as the file name. Validate. Let's try it now !

Minimize the AD2K2 window. Before you launch Flight Simulator, copy the MYRFO.AIR file and the aircraft.cfg file which are in this "Tutorial" directory into the "Aircraft\Test" directory of Flight Simulator. Launch then Flight Simulator. During this training session, I advise you to use Flight Simulator in a window. Thus you will be able to go easily from Flight Simulator to AD2K2 and then from AD2K2 back to Flight Simulator. Load the MyRFO aircraft and look at it in the outside view.


This dice doesn't look very streamlined, does it? We have to do something. Go back to the AD2K2 screen. Select the DICE sub-assy and activate the Sub-assy/Select first chain menu option. Remember : the first chain we draw was a square. It was then converted into triangles but the conversion does not delete the initial polygon. It remains as a hidden chain in the DICE sub-assy. Activate now the Draw/Copy/Translation menu option. The vector mode is the default setting, we will use it. Enter the following numbers in the vector coordinate input row:
      0.000  -3.000  0.000
Validate by clicking on the move button. The dice is no longer... a dice. It is now some kind of a parallelepipedic volume. Select now the desk sub-assy. As we saw before, it encompasses the front square of our cube (same remark as before : the conversion into triangles did not delete it). Activate the Draw/Copy/translation menu option and enter the following numbers in the vector coordinate input row:
      0.000  3.000  0.000
Validate by clicking on the move button.

The canopy and the pilot's head

Let's continue with that training session. I suggest you to add some fancy details to that rubbish model. Just to play with the template concept...

That short beam that we have designed will be used as the main part of the fuselage. I suggest you that we add a canopy on the top of it and, after that, the head of the pilot inside the canopy. To build the canopy, we will use a half-section template class. Then to achieve a semi-transparent aspect of it, we will assign to the canopy polygons a transparency index.

Select the Template/New class menu option. Click on the half-section radio-button and select the top option. Give the half-section class a name ("CANOPY" sounds good to me) and enter the number 8 in the number of sides data field. Click on the set parameters big green dot. It brings the template editor input window on the right of the screen. This template editor window asks you for the parameters of the first template of the class. Think to this template as one of the cradle of the canopy. For this particular design, I propose you to start with the rear cradle. We want this template on the top of the fuselage beam. Enter the following values in the coordinates of the origin of the first template data fields:
      0.000  -3.000  3.500
Check the U-shape checkbox at the bottom of the template editor window. Enter the following values into the height and width input data fields:
      height = 3.000
      width = 4.000
We will use the other parameter settings as they are. Validate the creation by clicking on the OK button and then again on the OK button of the class window.


Creating the front cradle of the canopy is a piece of cake. Activate the Template/New template menu option. Enter the following values into the height and width input data fields:
      height = 3.000
      width = 4.000
Enter the following values in the coordinates of the origin data fields:
      0.000  2.000  3.500
You cannot validate the template creation without editing the template parameters. Actually we will accept the default settings so you just have to click on the edit button and then on the OK button to close the template editor window. Validate by clicking on the OK button.

Now that we have two cradles, let's generate the polygons that will figure the canopy. Before we do that, create a new sub-assy and call it "CANOPY". Activate then the Template/Cover template menu option. The CANOPY template class is the only one which is available at the moment, it is therefore the only choice proposed in the input window associated to this menu option. Check that the cover section option is selected. As there are only two available templates in the class, they are automatically selected for this operation. Validate by clicking on the cover button. A set of polygons is automatically generated to cover the canopy.

To complete the design, we would like to figure a windshield in front of the canopy. A convenient way to do this is to create a third half-section template before the front cradle of the canopy and inside the fuselage. AD2K2 allows you to automatically generate the polygons joining the canopy to this third template and truncate them with the upper surface of the fuselage. Create a new template with the following parameters:
      height = 2.000
      width =  3.000
      origin = (0.000, 4.500, 1.000)

Accept the default settings in the template editor and validate. Make sure the CANOPY sub-assy is selected and activate the Template/Cover template menu option. Select the instersection with a plane option. Select the appropriate templates thanks to the Up/Down buttons beside the coordinate rows which display the coordinates of the template origins:
      #1 : 0.000  2.000  3.500
      #2 : 0.000  4.500  1.000
When you are finished with the template selection, click on the small OK button just below. You have now to select the instersection plane. Click on one of the vertices of the dice (whichever you want!). One of the side of the dice will be highlighted with an olive color. Press then on the C key as many times as needed to select one of the triangles on top of the dice. When the appropriate triangle appears in olive, click on the small OK button in the input window. Validate by clicking on the cover button.


The canopy is not fully completed. We still need to cover the rear part of it. Activate once again the Template/Cover template menu option and select the cover selected template option. Select the aft template with the Up/Down button beside the coordinate row which displays the coordinates of the template origin:
      0.000  -3.000  3.500
Click on the small AFT button at the bottom of the input window and validate by clicking on the cover button. That's it for the canopy!

To design the pilot's head, we will use a pair of horizontal section templates. Create a new template class that you will call "PILOT". Click on the xOy radio button on top of the class input window in order to select an horizontal section class. Accept the default side number (which is 12) and click on the set paremeters green button. We will accept the default parameters except for the height and width:
      height = 1.100
      width =  0.900

Exit the template editor by clicking on the OK button. Enter now the three coordinates of the origin of the first template:
      0.000  -1.000  4.000

Validate by clicking on the OK button.

To create the second template, we will use the template copy feature. Activate the Template/Copy template menu option. Enter the following values in the coordinates of the origin data fields:
      0.000  -1.000  5.500

Validate by clicking on the copy button.

Let's now generate the polygons that will figure the pilot's head. Create a new sub-assy and call it "PILOT". Activate the Template/Cover template menu option. This time, you may select one of the two existing classes or the other in the select template class list-box. Accept all the default settings (the PILOT class, the cover section option, the selected templates and the EXT button) and validate by clicking on the cover button. To be finished with the pilot's head, we still have to generate a polygon on the top and at the bottom of the head. Activate the Template/Cover template menu option. Select the cover selected template option. Select then the template defined by the following coordinates:
      0.000  -1.000  4.000

Click on the BOT button and validate by clicking on the cover button. Activate once more the Template/Cover template menu option. Select the cover selected template option. Select the template defined by the following coordinates:
      0.000  -1.000  5.500

Click on the TOP button and validate by clicking on the cover button.

Good job! Let's have a look now at the model tree. Launch the Model Tree Editor. The two new sub-assies appear in the sub-assy panel. They are unchecked. We need to add them to the model tree. Select the root node and add a sub-assy node. Assign it the PILOT sub-assy. Select again the root node and add the CANOPY sub-assy. The model tree is now composed of three sub-assy nodes: the DICE sub-assy, the CANOPY sub-assy and the PILOT sub-assy.

We are finished with the canopy and the pilot's head 3D model. We have now to make the canopy transparent and to texture the pilot's head. Exit the Model Tree Editor. Select the CANOPY sub-assy and assign it a color attribute (select the appropriate option in the CANOPY sub-panel combo-box which is presently set to undefined). Click on the sub-assy code window button of the sub-assy panel to display the CANOPY code page. Select a color (color icon at the bottom of the window). Move then the transparency cursor to 50%. Let the glare option as it is.

This it it for the canopy. Let's now texture the pilot's head.
Before you go ahead, you will need to copy the "Pilot.BMP" file which is in this "Tutorial" directory into the "Test" directory that you have created in the "AD2K2" one. You can copy the "Wing.BMP" file and the "Tail.BMP" file as well since we will need them to texture the wing and the tail.
The texturing principles and process are discussed in a dedicated application note. In this tutorial, you will be given instructions to:

I suggest you to look at it if you want more information on texture supports and texture limits.

First step: declare a texture
Click on the texture button of the sub-assy panel. The texture selection window is displayed. Click on the open button and select the PILOT.bmp file in the dialog box. Validate and then exit the texture selection window by clicking on the OK button.

Tip: There is a sub-panel below the texture list in the texture selection window which allows you to assign various attributes to the textures. For the sake of this demo, we use the default options. To get more details on these attributes, have a look at the section of this tutorial dedicated to the FS texture system.

Click now on the PILOT sub-panel combo-box to display the available options. You can see that a "pilot" option is now available. Select it.


Second step: define a texture support
Select the front view and select the desk sub-assy. The pilot's head looks pretty small on the screen. Click twice on the Up/Down button which is beside the scale data display in order to get a 1 foot per 50 pixels scale. Activate the chain creation mode. In the align mode (that is with the CTRL key pressed), click on the points located at the following coordinates in order to build a polygon:
      x = -0.4500   z = 5.500
      x =  0.4500   z = 5.500
      x =  0.4500   z = 4.000
      x = -0.4500   z = 4.000
Each time, AD2K2 will propose you to select among two possible "y" coordinates. Select whichever you want: it does not matter since we just want to define the limits of a front texture. Validate the creation. Once you are finished with the creation of this polygon, define it as a texture support (Utilities/Define chain as support menu option).

Third step: assign texture limits to the PILOT sub-assy
The pilot texture file features a nice picture with a front view of the pilot's head in its upper left part and an aft view of it in the lower-right corner. You cannot just assign the texture to the PILOT sub-assy and assume everything will be OK. AD2K2 requires a few more information to assign the appropriate part of the texture to each triangle of the PILOT sub-assy. To achieve that, we will have to assign the upper-left part of the texture to the front triangles of the PILOT sub-assy and the lower-right part of the texture to the aft triangles of the PILOT sub-assy.

Let us start with the front picture. Select the PILOT sub-assy and click on the sub-assy code window button. The PILOT code page is displayed.


Double-click on the LIMITS instruction at the beginning of the list. The texture support selection panel is displayed. As we already assigned a texture to the PILOT sub-assy, it is displayed in the left part of the panel. The default setting for the texture orientation is side: click on the front radio button in the texture sub-panel to fix it. Then we have to assign a texture support. Click on the small blue button in the upper-right corner of the texture support sub-panel. It loads the currently selected texture support. As we only defined one, there is no reason for it not to be the right one. If there were several texture supports in the list, you could navigate through the list by clicking on one of the left/right arrows in the texture support sub-panel. The min and max coordinates defining the frame supporting the texture are displayed in the sub-panel:
      xmin,xmax = -0.450, 0.450
      zmin,zmax =  4.000, 5.500
Let us now define which part of the texture is to be drawn within this frame. Click on the limits button. Select the front view option. Move the cursor over the picture displaying the texture. Look at the texture support sub-panel: the position of the cursor in the texture is displayed between the left and right arrows. Click on the top/left corner of it. The cursor position should be [0,0]. Validate the top/left corner position by clicking on the small OK button. Click now right in the middle of the texture (cursor position = [127,127]). Validate the bottom/right corner position by clicking on the small OK button. A red square is now delimiting the selected part of the texture.


Exit the texture support panel by clicking on the OK button. Look at the LIMITS instruction : it is no longer undefined:
    LIMITS front; -0.450, 0.450, 4.000, 5.500
This is it for the front part of the texture. Let us now deal with the aft one. Looking at the instruction list, you can see a list of triangles with their vertex indexes. Huh ! It won't be that easy to sort them in order to have the front one on top of the list and the aft one at the end... Don't worry. AD2K2 will do it for you. Exit the sub-assy code page and go back to the Graphic Editor. The PILOT sub-assy is selected. Make sure the multiple selection buffer is empty by clicking on the reset selection button of the tool bar. Activate the Sub-assy/Select chains.../aft menu option. Click again on the sub-assy code window button of the sub-assy panel to display the PILOT instruction code. You can see that a lot of TRIANGLE instructions are now highlighted: these are the triangles that are in the multiple selection buffer and that we have selected a few seconds ago. Click on the move at bottom button on the tool bar. The highlighted instructions are gathered at the end of the list. Click now on the first highlighted instruction. Click then on the insert limits button. A new LIMITS instruction is inserted just before the selected TRIANGLE instruction. It is undefined. We will use it to assign the lower-right part of the texture to the aft triangles of the sub-assy which are now gathered after this LIMITS instruction. The process is the same as described before:

The LIMITS instruction is updated. We are finished with the PILOT sub-assy texturing process. Let's try it! Launch Flight Simulator if it is not. If it is, make sure MyRFO is not the currently selected aircraft. Compile the model. When you are asked for it, click on the Keep button since we have already created the aircraft config files. Make sure the "Pilot.bmp" texture file is available in the aircraft texture directory. If it is not, copy it into this directory. Here we are! Have a look at the result.


Ugly, isn't it? Especially the pilot. He looks like an alien. A dummy one. Well, we are not competing for a beauty contest, are we? It's nothing more than a tutorial... Exit the Model Editor. As you can see, the texture support is highlighted. To switch it off, you can either select the Utilities/Show no utilities menu option or press the F2 key.

The wings

Designing the wing will bring no new concept, except the specular one. Anyway, we have already learnt a lot of things. It is time to review them, isn't it ?

It's time to add the wings. To do that, we will follow the following steps:

That shouldn't be that long... Let's go. Create a class of profiles and call it "WING". The default plane of a profile class is the yOz plane, that's fine. Select the biconvex (9) option. Enter the following values in the coordinates of the origin data fields:
    3.500 -4.500  0.000
Click on the set parameters button and enter the following data into the cord and thickness input data fields:
    cord =  9.000
    thick = 1.400
We will use the other parameter settings as they are. Validate the creation by clicking on the OK button and then again on the OK button of the class window.

We will create the second profile with the template copy menu option. There are now three available classes in the select a class list box. The default one is WING: of course we will accept it. Enter the coordinates of the origin of this new template:
    20.000  -2.500  1.000

Enter then its cord:
    cord =  6.000

The thickness will be set automatically:
    thick = 0.933

Create a new sub-assy and call it "RWING" (standing for Right Wing). Activate the Template/Cover template menu option and click on the wing tip / double radio-button. The origins of the templates we want to use are the good one... but they are in the wrong order. Click once on the Down button of the Up/Down arrow pair which is beside the first coordinate row in order to set the right order:
     3.500  -4.500  0.000
    20.000  -4.500  0.000
Accept the other default parameters and click on the cover button to validate. You have built the right wing.

As we want to texture the wing, let us define the associated texture support right now. Select the desk sub-assy and activate the chain creation mode. Select the top view and trim the scale in order to see the whole wing on the screen. Using the align mode, build a triangle which extremities encompass the whole wing:
    x =  3.500  y = -4.500
    x =  3.500  y =  4.500
    x = 21.800  y =  0.500
Validate and define the created triangle as a texture support.

Let us now texture the wing. No surprise: we will go through the same process as we did for the pilot's head:

Declare the texture:
Select the RWING sub-assy and open the sub-assy code window. Click on the select a texture button. Load the wing texture file. This file features an alpha index that we will use to create a specular effect. Make sure the WING row is selected in the texture list and select the specular option in the combo-box which is displayed in the sub-panel below the list. Exit the panel by clicking on the OK button.

Tip: To be displayed, the texture needs to be present in the project directory.

Assign a texture support:
Double-click then on the LIMITS instruction at the beginning of the list. Select the top option and click on the small blue button to select the texture support we defined a few seconds ago.
      xmin,xmax =  3.500, 21.800
      ymin,ymax = -4.500,  4.500
If it is not this one which is selected (check on the texture sub-panel) use the left and right arrows to cycle through the texture support list.

Assign texture limits:
Look at the picture in the left sub-panel. It is very simple. The red rectangle in the upper part features the extrados, the grey rectangle in the lower part features the intrados. Let us start with the extrados. Click on the limits button. Select the top view option. Move the cursor over the picture displaying the texture and click on the top/left corner of it (cursor position = [0,0]). Validate the top/left corner position by clicking on the small OK button. Click now on the bottom/right corner of the red rectangle (cursor position = [127,255]). Validate the bottom/right corner position by clicking on the small OK button. Exit the texture support panel by clicking on the OK button.

It is now time to sort the triangles in order to get the extrados triangles at the beginning of the list and the intrados triangles at the end. Exit the sub-assy code page and go back to the Graphic Editor. The RWING sub-assy should be selected. Activate the Sub-assy/Select chains.../bottom menu option to put the intrados triangles into the multiple selection buffer. Click on the sub-assy code window button of the sub-assy panel. Click on the move at bottom button on the tool bar to gather the intrados TRIANGLE instructions at the end of the list. Click now on the first highlighted instruction. Click then on the insert limits button to insert a new LIMITS instruction just before.

Let us now assign the texture limits of the intrados. Double click on the LIMITS instruction. Select the top option and call for the default texture support (the small blue button...). Click now on the limits button and select the lower view option. Assign the following limits:
top/left :     [  0,127]
bottom/right : [255,255]
Validate and exit the texture support panel. This is it...

Close the sub-assy code window and go back to the Graphic Editor. Building the left wing is really a piece of cake. Select the RWING sub-assy. Activate the Sub-assy/Mirror sub-assy menu option. In the input window which is displayed at the right of the screen, enter the name of the left wing sub-assy (I sugggest "LWING") and the description of it. Validate. Look at the Graphic Editor screen. The left wing has been designed without a single click from your engineers.


Select the LWING sub-assy and open the sub-assy code window. You can see that the instruction list is the replica of the RWING instruction list. It is sorted as the RWING sub-assy code list. It features two LIMITS instructioin as the RWING instruction list. Double-click on the first one. It is assigned a texture support with the right orientation (top). As you can see, this texture support is a mirror of the original one:
      xmin,xmax = -21.800, -3.500
      ymin,ymax =  -4.500,  4.500
Look now at the texture limits panel. It displays the following data :
      left/top =      0.000 -- 0.000
      right/bottom =  1.000 -- 1.000
      upper view
These are the default values, which means the mirror operation did not achieve the job. Well, let us do it !

Click on the limits button, make sure the top view is selected and assign the following limits:
top/left :     [  0,  0]
bottom/right : [255,127]
Validate and exit the texture support panel.

Select the second LIMITS instruction. It is also assigned the right texture support and the top orientation:
      xmin,xmax = -21.800, -3.500
      ymin,ymax =  -4.500,  4.500
If it is not, use the left/right arrows to call it. Click then on the limits button. Select the lower view option. Assign the following limits:
top/left :     [  0,127]
bottom/right : [255,255]
Validate and exit the texture support panel. This is it for the wing...

You want to see your aircraft on the tarmac, don't you? Wait a minute... We need to add the wing sub-assies to the model tree before. You know how to do that: it's just routine...

Let's go to the test airstrip now. Check that the currently selected aircraft in Flight Simulator is NOT MyRFO and compile the model. Go to the Flight Simulator screen.


OKay, it looks a little bit better. I am sure it would be perfect with a tail. Let's do that.

The tail

We could build the tail within this main assembly project file but this is a tutorial and we will do it another way. Let us create an assembly that will be called by the master project. Before we do that, we will export a part of the present design in order to be able to load it into this future assembly.

Select the DICE sub-assy and activate then the Sub-assy/Select all chains for export menu option. Save the file you are working on (click on the save button of the tool bar). Click then on the new model button of the tool bar in order to start a new job. Call it "TAIL" and clear the master project check box in the new project input window. Validate. Accept the invitation to clear all existing data. Activate the File/Import.../Import chains menu option and select the "MyRFO" file in the dialog box. Validate. An "Import" sub-assy is created in which are stored the polygons which compose the dice. That's a good start!

The TAIL assembly will be composed of

I suggest that you create right now three sub-assies in which we will store the polygons figuring these parts. Let us call them "FUSE", "VERTFIN", "RSTAB". A fourth one, to be called "LSTAB", will be generated later by a mirror effect on the RSTAB sub-assy.

There is nothing special with the design of the 3D model of the tail, except that you will test the automatic instersection feature. I will just give you the clicks and data to do it. It's just for the sake of practicing...

the rear part of the fuselage

Select the FUSE sub-assy by clicking on its icon in the sub-assy panel. Select the side view.

action option/button data remarks
new class Template/New Class FUSELAGE
xoz plane, section, 12 sides
origin: 0.000, -6.500, -3.500
rear part of the fuselage
parameters height: 7.000    width: 5.000 accept other parameters
then validate twice
new template Template/New template origin: 0.000, -22.000, -2.000
height: 4.000    width: 2.800
click on edit
then validate twice
cover template Template/Cover template default options validate by clicking on cover
cover template Template/Cover template dual summit cover
origin: 0.000, -22.000, -2.000
summit: 0.000, -24.000, -2.000
accept other parameters
and validate by clicking on cover


We are finished with the 3D design of the aft fuselage. Let us build the vertical stabilizer now. At the moment, we will just design the fixed part of it. The rudder is a moving part and moving parts are addressed in another section of this tutorial.

the vertical stabilizer

Select the VERTFIN sub-assy. We will use the automatic instersection feature of AD2K2 to build the vertical fin.

action option/button data remarks
new chain and 1st point coord: 0.000, -19.000, 7.800 click on add to validate
another point   coord: 0.000, -21.000, 7.800 click on add to validate
1st intersection
(select a plane)
inter. click on a vertex of the fuselage, then
click on C as many times as needed to
select the upper side of the fuselage
select the upper side of
the fuselage and click on OK
intersection
(select a point)
- select the point located at:
0.000,  -21.000,  7.800
click on OK
intersection
(enter a vector)
-
0.000,  0.000,  -1.000
click on OK
then again on OK
2nd intersection
(select a plane)
inter. click on a vertex of the fuselage, then
click on C as many times as needed to
select the upper side of the fuselage
select the upper side of
the fuselage and click on OK
intersection
(select a point)
- select the point located at:
0.000,  -19.000,  7.800
click on OK
intersection
(enter a vector)
-
0.000,  0.300,  -1.000
click twice on OK
then click on poly
make triangles Draw/Make triangles   one side of the vertical fin
copy and flip Sub Assy/
Copy and flip...
  select all chains
before copying and flipping them
reset and close selection then    

texturing the whole thing

As we want to texture the tail, let us define the associated texture support right now. Select the Desk sub-assy.

action option/button data remarks
new chain capture the following vertices in the align mode

y = -24.000,  z =  1.000
y = -21.000,  z =  7.800
y =  -6.500,  z = -3.500
click on poly to validate
texture support CTRL + F3 - declare as texture support
texture file open the "Tail" texture file, assign it default
options (default fallback color, normal kind)
load a texture file in the texture list
then click on OK to validate

Select the FUSE sub-assy in the sub-assy panel and assign it the tail texture file.


Let's do the same with the VERTFIN sub-assy. It's now time to assign texture limits to the FUSE sub-assy. Select it by clicking on its sub-panel in the sub-assy panel.

action option/button data remarks
sub-assy code page - open sub-assy code page
texture support double-click on first instruction side option
default () texture support
assign texture support
texture limits limits view: right
left/top =       1,  1
right/bottom = 255,127
assign texture limits, click on OK
to validate then Quit the sub-assy
code page
sort triangles Sub Assy/Select chains.../left - sort triangles
sub-assy code page - open sub-assy code page
sort triangles (ct'd) - move selected triangles at the
end of the list
select instruction select 1st highlighted instruction -  
insert LIMITS - insert a LIMITS instruction
texture support double-click on the LIMITS
instruction
side option
default () texture support
assign texture support
texture limits limits view: left
left/top =       1,128
right/bottom = 255,255
assign texture limits, click on OK
to validate then Quit the sub-assy
code page

This is it with the FUSE sub-assy. You just have to do the same thing with the VERTFIN sub-assy. You can go through the same process as you did just before.

the horizontal stabilizer

Let's build the horizontal stabilizers now. We will use the same intersection process. Then, I suggest we paint it in red. I don't want to bother you with another texture. Select the RSTAB sub-assy and select the top view.

action option/button data remarks
new chain and 1st point coord: 9.000, -19.400, 0.000 click on add to validate
another point   coord: 9.000, -21.600, 0.000 click on add to validate
1st intersection
(select a plane)
inter. click on a vertex of the fuselage, then
click on C as many times as needed
to select the right side of the fuselage
select the right side of
the fuselage and click on OK
intersection
(select a point)
- select the point located at:
9.000,  -21.600,  0.000
click on OK
intersection
(enter a vector)
-
-1.000,  0.000,  0.000
click on OK
then again on OK
2nd intersection
(select a plane)
inter. click on a vertex of the fuselage, then
click on C as many times as needed
to select the right side of the fuselage
select the right side of
the fuselage and click on OK
intersection
(select a point)
- select the point located at:
9.000,  -19.400,  0.000
click on OK
intersection
(enter a vector)
-
-1.000,  0.300,  0.000
click twice on OK
then click on poly
make triangles Draw/Make triangles   one side of the vertical fin
copy and flip Sub Assy/
Copy and flip...
  select all chains before
copying and flipping them
reset and close selection then    

Let's paint the stab. Make sure the RSTAB sub-assy is selected and assign it the color attribute.


Open the RSTAB sub-assy code page and double-click on the colored square at the bottom of the window. Select a red color (new button in the selection panel, then red color in the palette), validate and Quit the sub-assy code page.

You can now create the LSTAB sub-assy with the Sub-assy/Mirror sub-assy menu option.


To complete the design of the 3D model of the tail, we need now to set up the model tree. Open the Model Tree Editor. Add four sub-assy nodes to the root node and assign them the four sub-assies (FUSE, VERTFIN, RSTAB and LSTAB). This is it! We are finished with the Tail assembly. Before we go ahead, activate the File/Save as menu option to save the assembly file and call it "Tail".

Compile the assembly and insert it into the master project

We now need to compile the assembly. The compilation of an assembly creates a Tail.MD1 binary file which is stored into the project directory. While in the Model Tree Editor click on the compile button. Accept the default settings and click on the compile button. The compilation should be successful and you should be granted a congratulation message.

Exit the Model Tree Editor and go back to the master project. Open the MyRFO file. Open the Project Editor from the Graphic Editor tool bar. There is no change in the code list :
MYRFO   PROJECT          RFO black program
        MODEL SIZE       50 ft
        INTERNAL VIEW    no view
RFOASSY INSERT MAIN ASSY RFOASSY
        END OF PROJECT   caution : this is not a return instruction

Select the INSERT MAIN ASSY instruction and insert a new instruction by clicking on the insert button on the tool bar. Select an assembly insertion instruction and validate. It is an INSERT ASSEMBLY : click on the cycle button to turn it into a CALL ASSEMBLY. Double-click on the data field of this instruction (it is currently a ?) and select the TAIL file. Here is now the code list :
MYRFO   PROJECT          RFO black program
        MODEL SIZE       50 ft
        INTERNAL VIEW    no view
RFOASSY CALL ASSEMBLY    TAIL
RFOASSY INSERT MAIN ASSY RFOASSY
        END OF PROJECT   caution : this is not a return instruction

Why did we use a CALL instead of an INSERT ? Remember: the INSERT merges the assembly into the master project code list. As an assembly is ended by a RETURN, it would terminate the display of the model before the main assembly is displayed. A CALL does not merge the assembly code into the master project code, it calls it as a subroutine. Therefore, the RETURN at the end of the assembly will send you back to the instruction just following the CALL itself.

You can compile it (well... if MyRFO is not locked by Flight Simulator!) and have a look at the result on the tarmac.


What about a short flight with it?
- Sorry, guys, F.A.A. ain't gonna give you any authorization to fly this R.F.O.!
- Why-y-y-y ?
- You've got no landing light.
- Geeeez... I forgot about this landing light.

Landing light and other stuff...

Adding a landing light is not that difficult. We will add it on the leading edge of the right wing. Open the Model Tree Editor from the Graphic Editor tool bar. Select the root node and add a light node. Select the light node you have just created and click on the properties button. The light attribute window is displayed. Select the landing light option. Click on the yellow square in the color selection row to set the color of the light cone. The location of the light source is to be defined by its x, y and z coordinates that you enter in the dedicated data fields. The direction of the cone light is defined by a vector the coordinates of which (vx, vy and vz) are to be set in the row just below. Enter the following data into the input data fields:
      x,y,z :   11.700  4.100   1.100
      vx,vy,vz : 0.000  1.000  -0.200
Validate by clicking on the OK button. You can compile the model right now if you want. Before you look at the result on the tarmac, I suggest you to exit the Model Tree Editor and activate the View/Show light spots menu option in the Graphic Editor. The light location will appear as a cross into a square on the screen. Now, go to the Flight Simulator screen.


That's a nice achievement for a beginner!

Tip: An error during the compilation ? It may occur at two levels:

  • when the model tree is translated into a code section,
  • when the assembly code sections are linked into the project.
When the model tree is corrupted, a tree error list is displayed which lists the failing nodes with their index number (the following is an example: I have messed up the MYRFO file for that purpose).


This error list encompasses all the pink nodes and some other nodes uncompletely defined.

When the failure occurs at the main project level, a compilation error list is displayed which lists the failing instructions with their index number.


Look at the error panel:
   (4) master: assy does not exist
   compilation aborted

What does it mean?
(4) master: the 4th instruction of the master project code list is the CALL ASSEMBLY of the TAIL file. The TAIL file is missing.
You just have to fix the error and to compile again!


copyright Hervé Devred, 2003